<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/1.10.0/jquery.js"></script>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
<script src="https://cdn.staticfile.org/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>

<!-- Bootstrap CSS -->
<!--    <link rel="stylesheet" href="/css/bootstrap.css">-->
<link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/4.5.2/css/bootstrap.css" rel="stylesheet">

<body>
<input id="user_id" type="text" value="user_001" hidden="hidden">
<input id="job_code" type="text" value="code001" hidden="hidden">
<button id="click" class="action" act_type="click">点击</button>
<button id="collect" class="action" act_type="job_collect">收藏</button>
<button id="send" class="action" act_type="cv_send">投简历</button>
<button id="upload" class="action" act_type="cv_upload">上传简历</button>
<label id="label"></label>

</body>
<script>
    $(document).ready(function () {
        $(".action").click(function () {
            var user_id = $("#user_id").val();
            var act_time = new Date();
            var action = this.getAttribute("act_type")
            var job_code = $("#job_code").val();
            var log = user_id + "\t" + act_time + "\t" + action + "\t" + job_code;
            $.ajax({
                url: "http://192.168.142.135:80/kafka/log",
                type: "POST",
                dataType: "json",
                data: log
            })
        });
    })

</script>
</html>